#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<math.h>
using namespace std;

int val(float x, char ch)
{
	if (x == 0)
		return 0;
	
	if (x <= 1.0)
		return ch == 'y' ? 25 : 20;

	return ch == 'y' ? ceil(x - 1) + 25 : ceil(x - 1) + 20;
}

int main()
{
	float x;
	char ch;
	cin >> x >> ch;

	cout << val(x, ch) << endl;

	return 0;
}